package com.konghao.test.junit.util;

import com.konghao.test.junit.model.User;
import org.junit.Assert;

/**
 * EntitesHelper--JunitTest
 *
 * @author: Jovi
 * @createTime: 2017-10-24 14:50
 **/
public class EntitesHelper {

    private static User baseUser = new User(1,"admin","123","超级管理员");

    public static void assertUser(User expected, User actual) {
        Assert.assertNotNull(expected);
        Assert.assertEquals(expected.getUsername(),actual.getUsername());
        Assert.assertEquals(expected.getId(),actual.getId());
        Assert.assertEquals(expected.getNickame(),actual.getNickame());
        Assert.assertEquals(expected.getPassword(),actual.getPassword());
    }

    public static void assertUser(User expected) {
        assertUser(expected, baseUser);
    }
}
